// components/exhibitionButton/ExhibitionButton.js
import exhibition from '../../api/exhibition'
// components/exhibitionButton/ExhibitionButton.js
Component({
  properties: {
    exhibitionId: {
      type: String,
      value: ''
    },
    like: {
      type: Number,
      value: 0
    }
  },

  methods: {
    handleReservation() {
      // 触发自定义事件，同时传递展览ID
      this.triggerEvent('reservationtap');
      console.log("点赞操作");
      console.log("当前like值:", this.properties.like);
      console.log("当前exhibitionId:", this.properties.exhibitionId);
    }
  },

  // 组件生命周期（可选）
  lifetimes: {
    attached() {
      // 组件被添加到页面时触发
      console.log('组件已附加到页面');
      console.log('exhibitionId:', this.properties.exhibitionId);
      console.log('like:', this.properties.like);
    }
  }
});